<template>
  <div>
    <h1>Profile</h1>
    <p v-if="user">Welcome, {{ user.username }}</p>
    <p v-else>Please log in to view your profile.</p>
  </div>
</template>

<script>
import { mapGetters } from 'vuex';

export default {
  name: 'Profile',
  computed: {
    ...mapGetters(['user']),
  },
};
</script>
